package com.resource.response;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 泛微公共返回对象
 * 
 * @Author: xianggaoxiong
 * @Date: 2020-09-22 14:25
 **/
@Data
public class OfficeResponse<T> implements Serializable {

	private static final long serialVersionUID = 6133145384647688111L;
	/**
	 * 状态码
	 */
	private int status;

	/**
	 * 消息内容
	 */
	private String runtime;

	/**
	 * 返回数据
	 */
	private T data;

	/**
	 * 错误信息
	 */
	private List<OfficeErrorResponse> errors;

	public static class OfficeErrorResponse implements Serializable {

		private static final long serialVersionUID = 4460231737521927569L;
		/**
		 * 错误编码
		 */
		private String code;

		/**
		 * 错误信息
		 */
		private String message;

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getMessage() {
			return message;
		}

		public void setMessage(String message) {
			this.message = message;
		}
	}
}
